<{Tinclude "commom/admin_header"}>
   <{Tinclude"tenantcommom/tenant_inner_header"}>
    <{Tinclude"tenantcommom/tenant_left_menu"}>
<section id="main-content">
          <section class="wrapper">

              <div class="row">
                  <div class="col-lg-12 ds">
                    <!--COMPLETED ACTIONS DONUTS CHART-->
						<h3>发件箱</h3>
                               <{if $smlist}>
<{foreach $smlist as $v}>         
                      <!-- First Action -->
                      <div class="desc <{if $v["is_read"]}>read<{else}>noread<{/if}>">
                           <div data-toggle="modal" data-id="<{$v["id"]}>" data-type="showonly" data-target="#ajaxshowmessage">
                        <div class="thumb">
                      		<img alt="avatar" src="<{$v["thumb"]}>" width="30">
                      	</div>
                      	<div class="details">
                            <p><muted><{echo Common::Time_Tran($v["create_time"]);}></muted><br>
                      		  <{$v["to_base_name"]}> <{$v["title"]}><br>
                                   <{$v["note"]}><br>
                                   <muted>(<{if $v["is_read"]}>对方已阅<{else}>对方未阅<{/if}>)</muted>
                      		</p>
                      	</div>
                          </div>
                           <a class="btn btn-primary btn-xs btndelete" data-id="<{$v["id"]}>"  href="javascript:void(0);"><span class="glyphicon glyphicon-trash"></span></a>
                           
                      </div>
                      <{/foreach}>   

                      
                    <div class="col-md-12 text-center">
                           <?php Temp::Tinclude("commom/pager");?>
                     </div>    
                      <{else}>
                      <div class="col-md-12 col-xs-12">
                                 <h4 class="text-center">数据为空</h4>
                             </div>
                      <{/if}>
                  </div>
              </div>
          </section>
</section>
    <script>
        $(document).ready(function(){
            $("div.desc").each(function(){
                var aw=$(this).width();
                var w=$(this).find(".thumb").width()+60;
                $(this).find(".details").width(aw-w);
            });
        });
        
        $(".btndelete").click(function(){
                var parent_obj=$(this).parent(".desc");
                var animate_width=parent_obj.width()+50;
                var id=$(this).data("id");
                $.post("<{echo Common::RewriteUrl("SendMessage","public_ajax_delete");}>",{"id":id,"showtype":"send_show"},function(data){
                    parent_obj.css("position","relative");
                    parent_obj.animate({left:-animate_width+"px"},function(){
                        parent_obj.remove();
                    });
                });
               
            });
    </script>
    <{Tinclude"commom/admin_footer"}>